package com.lovegu.object.middle;

/**
 * @author 老顾
 * @title: Child1
 * @projectName java-restudy
 * @email: 1437594522@qq.com
 * @date 2022/9/21 8:19
 */
public class Child1 extends Parent1{
    private int c1 = 21;
    public int c2 = 22;
    private void cm1(){
        System.out.println("in cm1() c1=" + c1);
    }
    public void cm2(){
        System.out.println("in cm2() c2=" + c2);
    }
    public static void main(String[] args){
        int i;
        Parent1 p = new Parent1();
        i = p.f2; // i = p.f3; i = p.f4;
        p.fm2(); // p.fm3(); p.fm4();
        Child1 c = new Child1();
        i = c.f2; // i = c.f3; i = c.f4;
        i = c.c1; // i = c.c2;
        c.cm1(); // c.cm2(); c.fm2(); c.fm3(); c.fm4()
    }
}
